package lgs.hm.homework.work2;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import lgs.hm.haha.MyConfig;

@Configuration  //表明是配置类
@ComponentScan(basePackageClasses= {MyConfig.class},basePackages= {"lgs.hm.homework.work2"})
public class Work2 {
	@Autowired
	private ApplicationContext a;
	
	@Bean
	public Date aaa() {
		return new Date();
	}
}
